<?php
header ("Content-Type:text/html; charset= utf-8");
require_once ('config.php');
require_once (WEBSITEURL.'/'.ADMINLOC.'/article_list_templates.php');
require_once (WEBSITEURL.'/'.ADMINLOC.'/image_article_list_templates.php');
require_once (WEBSITEURL.'/'.ADMINLOC.'/channel_list_templates.php');
require_once (WEBSITEURL.'/'.ADMINLOC.'/weather_templates.php');

$system=new System();
$sys_style=$system->getSysStyle();
$index_model=$system->getIndexModel();
$index_movie=$system->getIndexMovie();
$index_movie=str_replace(".flv", "", $index_movie);
if($index_model==""||(!file_exists(WEBSITEURL."/templates/$sys_style/index/$index_model")))
{$index_model="default.htm";}

$smarty->template_dir=WEBSITEURL."/templates/$sys_style/index";
$smarty->assign("template_dir","templates/$sys_style");
$smarty->assign("index_movie","index_movie/$index_movie");
$smarty->registerPlugin("block","arclist","arclist"); //注册block
$smarty->registerPlugin("block","channellist","channellist"); //注册block
$smarty->registerPlugin("block","imgarclist","imgarclist"); //注册block
$smarty->registerPlugin("block","weather","weather");
$smarty->display($index_model,md5("index".$index_model));